<?php
/*+**********************************************************************************
 * The contents of this file are subject to the vtiger CRM Public License Version 1.0
 * ("License"); You may not use this file except in compliance with the License
 * The Original Code is:  vtiger CRM Open Source
 * The Initial Developer of the Original Code is vtiger.
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 ************************************************************************************/

require_once 'modules/Vtiger/EditView.php';
//流程实体编辑控制 BEGIN
/*if(entityInWorkFlow($currentModule,$focus->id)){
	 echo "<script type=\"text/javascript\">alert('".getTranslatedString("MSG_ENTITY_IN_WORKFLOW_CANT_EDIT")."');history.back();</script>";
	 exit;
}*/
//流程实体编辑控制 END
if($focus->mode == 'edit') {
	$smarty->display(vtlib_getModuleTemplate($currentModule, 'salesEditView.tpl'));
} else {
	/*
	global $current_user;
	$applyuserInfo = getUserBaseInfo ( $current_user->id ); 
	$applyuser     = $applyuserInfo["id"]; // $current_user->id
	$applyuser_name= $applyuserInfo["last_name"]; // $current_user->last_name
	$applydept     = $applyuserInfo["groupid"];
	$applydept_name= $applyuserInfo["groupname"];
	$jquery_init_fields = "<script type='text/javascript'>";
	$jquery_init_fields .= "jQuery(function(){";
	$jquery_init_fields .= "jQuery('#applyuser').val('".$applyuser."');";
	$jquery_init_fields .= "jQuery('#applyuser_name').val('".$applyuser_name."');";
	$jquery_init_fields .= "jQuery('#applydept').val('".$applydept."');";
	$jquery_init_fields .= "jQuery('#applydept_name').val('".$applydept_name."');";
	$jquery_init_fields .= "});</script>";
	$smarty->assign("JQUERY_INIT_FIELDS", $jquery_init_fields);
	*/
	$smarty->display(vtlib_getModuleTemplate($currentModule, 'CreateView.tpl'));
}

?>